"use strict"

/**
 * 保定市采购网爬虫
 *  
 */

var Base = require("./base");
var bd_spider = new Base();
bd_spider.name = "保定市政府采购网";
bd_spider.encode = "UTF-8";

bd_spider.getPageUrl = function (pg) {
   return  "http://www.bd.gov.cn/index.do?view=rsrmlist&ccid=382&page=" + pg;
}

bd_spider.getItems = function($){
    var items = [];
    $(".list tr td a").each(function (index, ele) {
          var e = $(ele);
          var item = {};
          item.title = e.text();
          item.url = "http://www.bd.gov.cn/" + e.attr("href");
          item.source = bd_spider.name;
          items.push(item);
     });
    return items;

}

exports = module.exports = bd_spider;